package com.googlecode.imanager.swing.form;

import com.googlecode.imanager.client.bridge.form.IComboBox;
import com.googlecode.imanager.client.form.ComboBox;
import com.googlecode.imanager.core.base.BridgeApplication;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class SwingComboBox<T> extends SwingInputList<T> implements IComboBox<T> {

    public SwingComboBox(BridgeApplication bridge, ComboBox<T> source) {
        super(bridge, source);
    }

    @Override
    protected javax.swing.JComboBox createTarget() {
        return new javax.swing.JComboBox(getModel());
    }

    @Override
    public javax.swing.JComboBox getTarget(){
        return (javax.swing.JComboBox) target;
    }
    
    @Override
    @SuppressWarnings("unchecked")
    public ComboBox<T> getSource() {
        return (ComboBox<T>) source;
    }

}
